﻿#if UNITY_EDITOR
using UnityEditor;
using System.IO;
using QFramework;

namespace GGameFramework
{
    public static class Excel2Json
    {
        public static string Convert(string filePath) // Application.dataPath + "/Excel/Localization/Localization.xlsx"
        {
            if (!File.Exists(filePath))
            {
                LogKit.E("不存在文件:" + filePath);
                return "";
            }

            string code = ExcelUtility.ConvertToJson(filePath);

            //刷新本地资源
            AssetDatabase.Refresh();

            return code;
        }
    }
}

#endif